﻿/*
 * Created by SharpDevelop.
 * User: Andrew Sadler
 * Date: 04/09/2012
 * Time: 23:30
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using RRRSRoguelike.Entities.Creatures;
using RRRSRoguelike.Managers;

namespace RRRSRoguelike.Helpers
{
	/// <summary>
	/// Description of Stats.
	/// </summary>
	public class Stats
	{
		//Change to dictionary.
		public Dictionary<string,int> StatList = new Dictionary<string,int>();
//		public int MonstersKilled = 0;
//		public int WeaponsGrabbed = 0;
//		public int WeaponssBroken = 0;
//		public int StepsTaken = 0;
//		public int TurnsWaited = 0;
//		public int TrapsSet = 0;
//		public int Wallsbuilt = 0;
			
		public bool slayer = false;

		public Stats()
		{
			DungeonManager.Instance.CreatureManager.MonsterKilledEvent += RaiseStat;
			DungeonManager.Instance.CreatureManager.Player.PlayerMoved += RaiseStat;
			DungeonManager.Instance.CreatureManager.Player.WeaponChanged += RaiseStat;
		}

		
		//Create a more dynamic version
		void RaiseStat(object sender, RaiseStatArgs e)
		{
			StatList[e.Stat]+= e.Value;
		}



	}
	
	public class RaiseStatArgs:EventArgs
	{
		public string Stat;
		public int Value;
		
		public RaiseStatArgs(string stat, int value)
		{
			this.Stat = stat;
			this.Value = value;
		}
	}
}
